#include<string>
#include <vector>
using namespace std;

class Solution {
public:
    int translateNum(int num) {
        string chs = to_string(num);
        vector<int> res(chs.size()+1, 0);
        res[0] = 1;
        res[1] = 1;

        for (int i = 2; i <= chs.size(); i++)
        {
            if (chs.substr(i-2, 2)>="10" && chs.substr(i-2,2)<="25"){
                res[i] = res[i-1]+res[i-2];
            }else{
                res[i] = res[i-1];
            }
        }
        return res[chs.size()];
    }
};